#include <stdio.h>
#include <ctype.h>
#include <string.h>
#define STLEN 3
char *s_gets(char *a, int size);
int main()
{
    char a[5];
    while (1)
    {
        *s_gets(a,5);
        puts(a);
    }
}
char *s_gets(char *a, int size)
{
    char *ret_val,*find;
    ret_val = fgets(a, size, stdin);
    if(!(find=strchr(a,'\n'))){
         while (getchar() != '\n')
        {
            continue;
        }
    }
    while (find=strchr(a,'\n'))
    {
        *find='\0';
    }
    return ret_val;
}
